import api from '../utils/axios'
import qs from 'qs'

import dataUtil from '../utils/dataUtil'

export default {

    /*获取论文协作*/
    getLwxzList: function (option) {
        // option.columns=['id','yan_jiu_ren_yuan_id','he_zuo_zhe','he_zuo_ci_shu','lun_wen_id','lun_wen_biao_ti','count:id']
        // option.group = option.group||['he_zuo_zhe']
        // console.log({option})
        option = dataUtil.formatApiOption(option)
        // console.log({option})
        return api.post('api/v1/datasets/1028', option).then((resp) => {
            return Promise.resolve(dataUtil.formatTableData(resp.data))
        })
    },

    /*获取论协作ID信息*/
    getLwxzInfoById(id) {
        let option = {
            id: id
        }
        option = dataUtil.formatApiOption(option)
        return api.post('api/v1/datasets/1028', option).then((resp) => {
            return Promise.resolve(dataUtil.formatTableData(resp.data).data[0])
        })
    },


}
